﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Ankin.EHBH.Web.Controls
{
    public partial class leftNotice : System.Web.UI.UserControl
    {
        BLL.BllNotice bllnotice = new Ankin.EHBH.BLL.BllNotice();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DisplayData();
            }
        }



        public void DisplayData()
        {
            rptNoticeList.DataSource = bllnotice.GetNoticeTitle("rownum <6  ", " and EXPIRE>=sysdate").Tables[0].DefaultView;
            rptNoticeList.DataBind();
        }
        public string getTitleNotice(string title)
        {
            string str = title;
            if (title.Length > 8)
            {
                str = title.Substring(0, 8) + "...";
            }
            return str;
        }
               

    }
}